Support DEB_BUILD_OPTIONS parallel=N.
authorRob Browning <rlb@defaultvalue.org>
Sun, 18 Apr 2010 06:37:42 +0000 (23:37 -0700)
committerRob Browning <rlb@defaultvalue.org>
Sun, 18 Apr 2010 06:37:42 +0000 (23:37 -0700)
debian/changelog
debian/rules

index 8731d5623fa7f6fc6281e3bbf385390cee7fd5ba..11951507f4e622b8e02cf07bde7baeec5dc05728 100644 (file)
@@ -3,7 +3,9 @@ emacs23 (23.1+1-7) unstable; urgency=low
   * Remove Jerome from debian/control Uploaders since he has
     retired. (closes: #573442)
 
- -- Rob Browning <rlb@defaultvalue.org>  Sat, 17 Apr 2010 19:38:45 -0700
+  * Support DEB_BUILD_OPTIONS parallel=N.
+
+ -- Rob Browning <rlb@defaultvalue.org>  Sat, 17 Apr 2010 23:37:04 -0700
 
 emacs23 (23.1+1-6) unstable; urgency=low
 
index cceafdff70470f6e7a5aed13154558529a7d4a99..9f6f68c7fae8b5157cf4aefa071a92347b1c60f4 100755 (executable)
@@ -183,6 +183,11 @@ else # not noopt
   endif # neq (m68k,$(DEB_HOST_ARCH))
 endif # not noopt
 
+joblimit := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(joblimit))
+  joblimit := 1
+endif
+
 target := $(DEB_HOST_GNU_TYPE)
 movemail_bin := usr/lib/emacs/$(runtime_ver)/$(target)/movemail
 
@@ -301,9 +306,9 @@ define checkdir
 endef
 
 define build_cmd
-  $(MAKE) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+  $(MAKE) -j $(joblimit) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
   # If we don't use bootstrap, we need to explicitly build info.
-  $(MAKE) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" info
+  $(MAKE) -j $(joblimit) -C $(1) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" info
 endef
 
 # If we ever need to do the stripping outside of dh_strip, just add an